package com.yanmaohu.yulia.bean;

/**
 * @author Bright Lee
 */
public final class AsSubqueryClause implements TableContentsSource {

    private int beginIndex;
    private int endIndex;
    private IdentifierList columnNameList;
    private Subquery subquery;
    private WithOrWithoutData withOrWithoutData;

    public AsSubqueryClause(int beginIndex,
                            int endIndex,
                            IdentifierList columnNameList,
                            Subquery subquery,
                            WithOrWithoutData withOrWithoutData) {
        this.beginIndex = beginIndex;
        this.endIndex = endIndex;
        this.columnNameList = columnNameList;
        this.subquery = subquery;
        this.withOrWithoutData = withOrWithoutData;
    }

    @Override
    public int getBeginIndex() {
        return beginIndex;
    }

    @Override
    public int getEndIndex() {
        return endIndex;
    }

    public IdentifierList getColumnNameList() {
        return columnNameList;
    }

    public Subquery getSubquery() {
        return subquery;
    }

    public WithOrWithoutData getWithOrWithoutData() {
        return withOrWithoutData;
    }

}
